<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8">
    <title>Login - Lingmai Warehouse Management</title>
    <link rel="stylesheet" href="${ctxPath}/assets/common/login2023css/normalize.min.css">
    <link rel="stylesheet" href="${ctxPath}/assets/common/login2023css/style.css">
</head>
<style>
    input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active {
        -webkit-transition-delay: 99999s;
        -webkit-transition: color 99999s ease-out, background-color 99999s ease-out;
    }
</style>

<body>
<div id="formContainer" class="dwo">
    <div class="formLeft">
        <img src="${ctxPath}/assets/common/login2023img/logo01_01.png">
    </div>
    <div class="formRight">
        <!-- Forgot password form -->
        <!-- <form id="forgot" class="otherForm">
            <header>
                <h1>忘记密码</h1>
                <p>输入邮箱找回密码</p>
            </header>
            <section>
                <label>
                    <p>邮箱</p>
                    <input type="email" placeholder=" ">
                    <div class="border"></div>
                </label>
                <button type="submit">发送邮件</button>
            </section>
            <footer>
                <button type="button" class="forgotBtn">返回</button>
            </footer>
        </form> -->

        <!-- Login form -->
        <form id="login">
            <header>
                <h1>Welcome Login</h1>
                <p>Lingmai Smart Warehouse Management System</p>
            </header>
            <section>
                <label>
                    <p>Username</p>
                    <input name="login" type="text" placeholder=" " autocomplete="off">
                    <div class="border"></div>
                </label>
                <label>
                    <p>Password</p>
                    <input name="pwd" type="password" placeholder=" ">
                    <div class="border"></div>
                </label>
                <button type='button'>LOGIN</button>
            </section>
            <!-- <footer>
                <button type="button" class="forgotBtn">忘记密码？</button>
                <button type="button" class="registerBtn">新用户？</button>
            </footer> -->
        </form>

        <!-- Register form -->
        <!-- <form id="register" class="otherForm">
            <header>
                <h1>用户注册</h1>
                <p>注册后享受更多服务</p>
            </header>
            <section>
                <label>
                    <p>用户名</p>
                    <input type="text" placeholder=" ">
                    <div class="border"></div>
                </label>
                <label>
                    <p>邮箱</p>
                    <input type="email" placeholder=" ">
                    <div class="border"></div>
                </label>
                <label>
                    <p>密码</p>
                    <input type="password" placeholder=" ">
                    <div class="border"></div>
                </label>
                <label>
                    <p>重复密码</p>
                    <input type="password" placeholder=" ">
                    <div class="border"></div>
                </label>
                <button type="submit">注 册</button>
            </section>
            <footer>
                <button type="button" class="registerBtn">返回</button>
            </footer>
        </form> -->
    </div>

    <!--	    <div class="login3">-->
    <!--           <img src="${ctxPath}/assets/expand/images/jilu.png" style="width: 180px;height: 180px;"/>-->
    <!--	    </div>-->
    <!--	    <div class="login4">-->
    <!--           <img src="${ctxPath}/assets/expand/images/applet.jpg" style="width: 180px;height: 180px;"/>-->
    <!--	    </div>-->
    <!--	    <div class="login41">-->
    <!--           <img src="${ctxPath}/assets/expand/images/jiluScanApp.png" style="width: 180px;height: 180px;"/>-->
    <!--	    </div>-->
    <div class="login5">
        <p style="width:600px;margin:0 auto;text-align: center;color:#939393;font-size: 11px;">© 2025 Shandong Lingmai Intelligence Technology Co., Ltd. All Rights Reserved</p>
        <div style="width:400px;margin:0 auto;">
            <div style="width: 50%;float: left;">
                <a target="_blank" href="https://beian.miit.gov.cn" style="display:inline-block;text-decoration:none;height:20px;line-height:20px;"><p style="float:right;height:20px;line-height:20px;margin: 0px 0px 0px 5px; color:#939393;font-size: 11px;">ICP License No. 2021023901-1</p></a>
            </div>
            <div style="width: 50%;float: right;">
                <a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=37010102001147" style="display:inline-block;text-decoration:none;height:20px;line-height:20px;width: 100%;"><img src="${ctxPath}/assets/expand/images/beiangongan.png" style="float:left;"/><p style="fontfloat:left;height:20px;line-height:20px;margin: 0px 0px 0px 5px; color:#939393;font-size: 11px;">Filing No. 37010102001147</p></a>
            </div>
        </div>
    </div>
</div>
<!-- <script src="https://www.jq22.com/jquery/jquery-1.10.2.js"></script> -->
<script type="text/javascript" src="${ctxPath}/assets/common/libs/jquery/jquery-3.2.1.min.js"></script>
<script src="${ctxPath}/assets/common/login2023js/script.js"></script>
<script type="text/javascript" src="${ctxPath}/assets/common/libs/layui/layui.js"></script>
<script src="${ctxPath}/assets/common/login2022js/Treatment.js" type="text/javascript"></script>
<script type="text/javascript">
    $(document).keypress(function(e) {
        // 回车键事件
        if(e.which == 13) {
            $('button[type="button"]').click();
        }
    });
    var open = 0;
    layui.use('layer', function() {
        //非空验证
        $('button[type="button"]').click(function() {
            var login = $('input[name="login"]').val();
            var pwd = $('input[name="pwd"]').val();
            if(login == '') {
                ErroAlert('Please enter your username');
            } else if(pwd == '') {
                ErroAlert('Please enter your password');
            }  else {
                //登陆
                var JsonData = {
                    username: login,
                    password: pwd
                };
                $.ajax({
                    type: "POST",
                    url: "${ctxPath}/login",
                    dataType:'json',
                    data: JsonData,
                    beforeSend: function () {
                    },
                    success: function (data) {
                        window.location.href = '${ctxPath}/login';
                    },
                    error: function (data) {
                        console.log(data)
                        if(data.status == 200){
                            window.location.href = '${ctxPath}/login';
                        } else {
                            // ErroAlert('账号密码不正确');
                            ErroAlert('Incorrect username or password');
                        }
                    },
                    complete: function (data) {
                    }
                });
            }
        })
    })
</script>
</body>

</html>

